home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8560 < prev    next >
Encoding:
Text File  |  1996-08-05  |  906 b   |  42 lines

  1. Newsgroups: comp.lang.c++
  2. Path: news.spb.su!demos!pluscom!usenet
  3. From: sergeyp@albea.ugatu.ac.ru (Sergey Pavlov)
  4. Subject: Re: write()
  5. X-Newsreader: Forte Free Agent 1.0.82
  6. Sender: usenet@news.rinet.ru (Backup pseudo-user)
  7. Nntp-Posting-Host: albea.ugatu.ac.ru
  8. Organization: Albea
  9. Message-ID: <DMz4Dp.C6t@news.rinet.ru>
  10. References: <4g0u21$4b3@braddon.its.utas.edu.au>
  11. Date: Sun, 18 Feb 1996 13:35:41 GMT
  12.  
  13. DNA wrote:
  14.  
  15. >is it possible to do the folowing?...
  16.  
  17. >(semi pseudo-code...)
  18.  
  19. >#include <fstream.h>
  20.  
  21. >ofstream out("somefile",ios::bin);
  22.  
  23. >long BIG(64000);
  24.  
  25. >char bigarray[BIG];
  26.  
  27. >out.write(bigarray,BIG);    // ???
  28.  
  29. >the reason is that I want to write the contents of an array
  30. >which is ~64k big to disk and the program doesn't really appreciate
  31. >it.
  32.  
  33. >TIA
  34.  
  35. In declaration of method "write" second parameter has type "int",
  36. therefore if compiler is 16-bit, then maximum lengh of buffer can be
  37. 32767.
  38.  
  39.  
  40.  
  41.  
  42.